//
//  WeViewController.m
//  IntimateGift
//
//  Created by zh on 14/12/22.
//  Copyright (c) 2014年 蔡宏业. All rights reserved.
//

#import "WeViewController.h"

@interface WeViewController ()

@end

@implementation WeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"关于我们";
    self.view.backgroundColor = [UIColor whiteColor];
    
//    self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(doneBarItemClicked:)] autorelease];
    
    // 关于我们。。。
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(self.view.bounds.size.width * 0.25, self.view.bounds.size.height - self.view.bounds.size.height * 0.78, self.view.bounds.size.width * 0.8, self.view.bounds.size.height * 0.4)];
    [self.view addSubview:label];
    
    label.text = @"为温馨而来，与礼物同去";
    //label.numberOfLines = 0;
    label.textColor = [UIColor redColor];
    //    label.backgroundColor = [UIColor orangeColor];
    label.font = [UIFont systemFontOfSize:16];
    [label release];
    
    
    
    
    //图标下面的名字
    UILabel *label3 = [[UILabel alloc]initWithFrame:CGRectMake(self.view.bounds.size.width / 2 - self.view.bounds.size.width * 0.09, self.view.bounds.size.height - self.view.bounds.size.height * 0.78, self.view.bounds.size.width * 0.23, self.view.bounds.size.height * 0.12)];
    label3.text = @"温馨礼物";
    label3.textColor = [UIColor blackColor];
    [self.view addSubview:label3];
    label3.font = [UIFont systemFontOfSize:16];
    [label3 release];
    
    
    
    
    
    
    // 图标
    UIImageView *myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.bounds.size.width / 2 - self.view.bounds.size.width * 0.11, self.view.bounds.size.height - self.view.bounds.size.height * 0.88, self.view.bounds.size.width * 0.23, self.view.bounds.size.height * 0.12)];
    [self.view addSubview:myImageView];
    //    loginImageView.backgroundColor = [UIColor redColor];
    myImageView.image = [UIImage imageNamed:@"log.jpg"];
    myImageView.layer.cornerRadius = 12;
    myImageView.backgroundColor = [UIColor redColor];
    myImageView.clipsToBounds = YES;
    myImageView.layer.cornerRadius = 20;
    [myImageView release];
    
    // 版本号
    
    
    //    vLabel.backgroundColor = [UIColor redColor];
    
    // Do any additional setup after loading the view.
    
    UIButton *button = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [self.view addSubview:button];
    button.frame = CGRectMake( self.view.bounds.size.width / 2 - self.view.bounds.size.width * 0.11, self.view.bounds.size.height - self.view.bounds.size.height * 0.48, self.view.bounds.size.width * 0.23, self.view.bounds.size.height * 0.065 ) ;
    button.enabled = NO;
    [button setTitle:@"v1.0" forState:(UIControlStateNormal)];
//    [button addTarget:self action:@selector(button:) forControlEvents:(UIControlEventTouchUpInside)];
    [button.layer setMasksToBounds:YES];
    [button.layer setCornerRadius:10.0]; //设置矩形四个圆角半径
    [button.layer setBorderWidth:1.0]; //边框宽度
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 1, 0, 0, 1 });
    
    [button.layer setBorderColor:colorref];
    
    UIImageView *image1 = [[UIImageView alloc]initWithFrame:CGRectMake(self.view.bounds.size.width / 2 - self.view.bounds.size.width * 0.12, self.view.bounds.size.height - self.view.bounds.size.height * 0.38, self.view.bounds.size.width * 0.28, self.view.bounds.size.height * 0.15 ) ];
    [image1 setImage:[UIImage imageNamed:@"zhangke.png"]];
    
    [self.view addSubview:image1];
    [image1 release];
    
    
    
    UIImageView *image2 = [[UIImageView alloc]initWithFrame:CGRectMake(self.view.bounds.size.width / 2 - self.view.bounds.size.width * 0.43, self.view.bounds.size.height - self.view.bounds.size.height * 0.38, self.view.bounds.size.width * 0.28, self.view.bounds.size.height * 0.15 ) ];
    [image2 setImage:[UIImage imageNamed:@"zhouhang.png"]];
    
    [self.view addSubview:image2];
    [image2 release];
    
    
    
    UIImageView *image3 = [[UIImageView alloc]initWithFrame:CGRectMake(self.view.bounds.size.width / 2 - self.view.bounds.size.width * -0.20, self.view.bounds.size.height - self.view.bounds.size.height * 0.38, self.view.bounds.size.width * 0.28, self.view.bounds.size.height * 0.15 ) ];
    [image3 setImage:[UIImage imageNamed:@"caihongye.png"]];
    
    [self.view addSubview:image3];
    [image3 release];
//    vLabel.backgroundColor = [UIColor redColor];
    
    // Do any additional setup after loading the view.
}

- (void)doneBarItemClicked:(UIBarButtonItem *)item
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.translucent = NO;
//    self.navigationController.navigationBar.hidden = YES;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
